<template>
    <div>
      <Header :position="positionTitle"></Header>
      <el-card style="height: 873px">
        <h3 slot="header">
          模型详情
        </h3>
        <div style="display: flex; justify-content: space-between; padding: 10px 10px 10px 0px; ">
          <div>
            <el-select placeholder="选择算法类别" style="margin-right: 20px"
                       v-model="typeSelect1">
              <el-option v-for="item in typeSelectData1" :key="item"
                         :label="item.name" :value="item.value"></el-option>
            </el-select>
            <el-select placeholder="训练用户" style="margin-right: 20px"
                       v-model="typeSelect2">
              <el-option v-for="item in typeSelectData2" :key="item"
                         :label="item.name" :value="item.value"></el-option>
            </el-select>
              <el-button type="primary" icon="el-icon-arrow-right" @click="searchData">检索</el-button>
          </div>

        </div>
        <el-table :data="testData"
                  style="width: 100%;"
                  height="630"
                  stripe
                  highlight-current-row
                  border
                  ref="tableList">
          <el-table-column label="算法" prop="algorithm"></el-table-column>
          <el-table-column label="训练参数" prop="TrainingParameters"></el-table-column>
          <el-table-column label="测试参数" prop="testParameters"></el-table-column>
          <el-table-column label="时间" prop="time"></el-table-column>
          <el-table-column label="准确率" prop="accuracy"></el-table-column>
          <el-table-column label="操作">
<!--            <template slot-scope="scope">-->
            <template>
              <el-button type="primary" size="small" @click="deviceVisible=true">测试</el-button>
              <el-button type="danger" size="small" @click="deviceVisible=true">删除</el-button>
            </template>
          </el-table-column>
        </el-table>
        <div style="margin-top: 10px;">
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="currentPage4"
            :page-sizes="[10, 20, 50, 100]"
            :page-size="20"
            style="display: inline-block"
            layout="total, sizes, prev, pager, next, jumper"
            :total="400">
          </el-pagination>
        </div>
      </el-card>
    </div>
</template>

<script>
  import Header from "../Header";
  export default {
    name: 'ModelCard',
    components:{Header},
    data(){
      return{
        typeSelect1:'',
        typeSelect2:'',
        typeSelectData1:[{name:'频率',value:1},{name:'模型',value:2},{name:'神经网络',value:3},{name:'3D卷积',value:4},],
        typeSelectData2:[{name:'宋修齐',value:1},{name:'徐乐语',value:2},{name:'康和安',value:3},{name:'常经赋',value:4},],
        testData:[{algorithm:'频率',TrainingParameters:'默认',testParameters:'参数一',time:'2020-11-01',accuracy:'98.3%'},
          {algorithm:'模型',TrainingParameters:'默认',testParameters:'默认',time:'2020-11-02',accuracy:'94.2%'},
          {algorithm:'神经网络',TrainingParameters:'参数一',testParameters:'默认',time:'2020-11-03',accuracy:'88.6%'},
          {algorithm:'3D卷积',TrainingParameters:'默认',testParameters:'默认',time:'2020-11-04',accuracy:'90%'},
          {algorithm:'频率',TrainingParameters:'参数二',testParameters:'默认',time:'2020-11-05',accuracy:'79.6%'},
          {algorithm:'神经网络',TrainingParameters:'默认',testParameters:'参数二',time:'2020-11-06',accuracy:' 90.2%'},],
        positionTitle:{
          secondTitle:'算法管理' ,
          thirdTitle:'模型管理',
          routeString:'/Algorithm/AlgorithmConfig'
        },
      }

    }
  }
</script>

<style scoped>

</style>
